package com.woniu.service;

import com.woniu.entity.CtfContainer;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.CtfRange;
import com.woniu.entity.PageBean;
import com.woniu.entity.vo.ContainerVo;
import com.woniu.utils.ResponseMyEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.io.IOException;
import java.util.Date;

/**
* @author nanqiao
* @description 针对表【ctf_container】的数据库操作Service
* @createDate 2025-06-09 17:11:49
*/
public interface CtfContainerService extends IService<CtfContainer> {
    //创建容器
    void createContainer(String imageId, String containerName,int containerPort,  String flagValue) throws IOException;

    void startContainer(String containerId);

    void stopContainer(String containerIdOrName);

    void createStartContainer(String imageId, String containerName, int containerPort, String flagValue);

    PageBean<CtfContainer> selectPage(Integer pageNum, Integer pageSize, CtfContainer container);

    ContainerVo startContainerByIdOrName(String rangeId, String rangeName);

    void updateContainerUpdateTime(String containerId, Date date);

    void updateFlagMatchAndTime(String containerId);
}

